<?php


require 'database.php';

$base=new Db;

// https://demo.yiyocms.com/uploads/user/157/allimg/20240612/157-240612225Q2932.jpeg

$image_url=$_POST['image_url'];

$url=explode("/",$image_url);

$url=$url[count($url)-1];

$jpg=explode(".",$url);

$jpg=$jpg[count($jpg)-1];

$__ey_images_upload__=$base->doSql('insert into ey_images_upload set aid=0,title="'.$url.'",image_url="'.$image_url.'",mime="'.$jpg.'",add_time="'.time().'"');



if($__ey_images_upload__){
    return json([
        "code"=>200    
    ]);
}else{
    return json([
        "code"=>-1    
    ]);
}